package com.genius.adminmanager.user.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSONObject;
import com.genius.adminmanager.other.entity.ResponseJson;
import com.genius.adminmanager.user.service.UserService;

@Controller
public class TreeSelectController {
	@Autowired
    @Qualifier("userTreeSelectService")
    private UserService userTreeSelectService;
	
	@PostMapping("/adminmanager/user/getTreeSelect")
	@ResponseBody
	public JSONObject getTreeSelect(){
		JSONObject response = new JSONObject();
    	response.put(ResponseJson.code, 0);
    	response = userTreeSelectService.getTreeSelect(response);
    	return response;
	}   
	@PostMapping("/adminmanager/user/getUserTreeSelect")
	@ResponseBody
	public JSONObject getUserTreeSelect(){
		System.out.println("aaaaaaaaaaaa");
		JSONObject response = new JSONObject();
    	response.put(ResponseJson.code, 0);
    	response = userTreeSelectService.getUserByTreeSelect(response);
    	return response;
	}
	@PostMapping("/adminmanager/user/getUserTreeSelect1")
	@ResponseBody
	public JSONObject getUserTreeSelect1(){
		JSONObject response = new JSONObject();
    	response.put(ResponseJson.code, 0);
    	response = userTreeSelectService.getUserTreeSelect1(response);
    	return response;
	}
}
